<template>
  <div>
    <div class="table-title">
      营销策略添加
    </div>
    <div class="table-padding " style='width:80%;margin:0 auto;padding-bottom:20px;'>
      <div style="margin: 20px;"></div>

      <el-form :model="modelForm" ref="modelForm" label-width="100px" class="demo-ruleForm text-left"
               style="width:90%;">
        <div class="title-info text-left">
          基本信息
        </div>
        <el-form-item label=" " prop="name" :rules="[]" style="width:72.5%">
          <el-input placeholder="请输入名称" v-model="modelForm.name" size="medium">
            <template slot="prepend">
              <el-tooltip placement="top" content="请输入名称">
                <el-button tabIndex="-1">名称</el-button>
              </el-tooltip>
            </template>

          </el-input>
        </el-form-item>
       <!-- <el-form-item label=" " prop="cinema" :rules="[]">
          <div class="el-input el-input-group el-input-group&#45;&#45;prepend addprepend">
            <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
              <span>策略类型</span>
            </div>
            <el-radio-group v-model="modelForm.discountType">
              <el-radio-button :label="i.id" v-for="(i,index) in discountTypes" :key='index'>{{i.name}}
              </el-radio-button>
            </el-radio-group>
          </div>
        </el-form-item>-->
        <el-form-item label=" " prop="name" :rules="[]" style="width:40%">
          <el-input placeholder="请输入折扣率" v-model="modelForm.discountPercent" size="medium">
            <template slot="prepend">
              <el-tooltip placement="top" content="请输入折扣率">
                <el-button tabIndex="-1">折扣率</el-button>
              </el-tooltip>
            </template>
            <template slot="append">%</template>
          </el-input>
        </el-form-item>
        <el-form-item label=" " prop="state" :rules="[]">
          <div class="el-input el-input-group el-input-group--prepend addprepend">
            <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
              <span>状态</span>
            </div>
            <el-radio-group class="radio-group" v-model="modelForm.state">
              <el-radio v-for="item in states"
                        :label="item.key"
                        :value="item.key"
                        :key="item.key">
                {{item.text}}
              </el-radio>
            </el-radio-group>
            <br>
          </div>
        </el-form-item>

        <div class="title-info text-left">
          <el-row>
            <el-col :span="10">
              策略条件项
            </el-col>
            <el-col :span="14" class="center-center" style="padding-right:20px">
              <div class="text-right" style="width:100%;color:#bababa;cursor: pointer;">
                    <span @click="showInfo=showInfo?false:true">
                        <span v-if="showInfo"><i class="icon icon-shang" style="font-size:15px"></i>收起显示</span>

                        <span v-if="!showInfo"><i class="icon icon-weibiaoti35" style="font-size:14px;"></i>展开显示</span>
                    </span>
              </div>
            </el-col>
          </el-row>
        </div>
        <div v-if="showInfo">

          <div class="title-info1 text-left" @click="oneShow=!oneShow">
            <el-row>
              <el-col :span="10">时间条件</el-col>
              <el-col :span="14">
                <div class="text-right" style="width:100%;color:#bababa;cursor: pointer;">
                    <span>
                        <span v-if="oneShow"><i class="icon icon-shang" style="font-size:15px"></i></span>
                        <span v-if="!oneShow"><i class="icon icon-weibiaoti35" style="font-size:14px;"></i></span>
                    </span>
                </div>
              </el-col>
            </el-row>
          </div>

          <div v-if="oneShow">
            <!-- 时间条件 start -->
            <div class="block_line">
              <!-- 类别 -->
              <el-row>
                <el-col span='24'>
                  <el-form-item label=" " prop="state" :rules="[]">
                    <div class="el-input el-input-group el-input-group--prepend addprepend">
                      <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                        <span>类别</span>
                      </div>
                      <el-radio-group class="radio-group" v-model="modelForm.type">
                        <el-radio v-for="item in type"
                                  :label="item.id"
                                  :value="item.id"
                                  :key="item.id">
                          {{item.name}}
                        </el-radio>
                      </el-radio-group>
                      <br>

                    </div>
                  </el-form-item>
                </el-col>
              </el-row>
              <div style='font-size:12px;color:red;margin-left: 100px;'>
                <el-tag style='margin-left:5px;margin-bottom:20px;margin-top:0px;'
                        v-for="tag in tags"
                        :key="tag.name"
                        :type="tag.type" size='mini '>
                  {{tag.name}}
                </el-tag>
              </div>

              <div v-if="modelForm.type=='1'">
                <el-form-item label=" " prop="cinema" :rules="[]">
                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>周</span>
                    </div>
                    <el-select v-model="modelForm.week" multiple placeholder="请选择星期" style="width:60%" size="medium"
                    >
                      <el-option
                        v-for="item in weekList"
                        :key="item.key"
                        :label="item.text"
                        :value="item.key">
                      </el-option>
                    </el-select>
                  </div>

                </el-form-item>
              </div>
              <div v-if="modelForm.type=='2'">
                <el-form-item label=" " prop="cinema" :rules="[]">
                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>日期段</span>
                    </div>
                    <el-date-picker
                      v-model="modelForm.period" size="medium"
                      type="daterange"
                      range-separator="至"
                      start-placeholder="开始日期"
                      end-placeholder="结束日期">
                    </el-date-picker>
                  </div>
                </el-form-item>
              </div>
              <div v-if="modelForm.type=='3'">
                <el-form-item label=" " prop="cinema" :rules="[]">
                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>指定月</span>
                    </div>
                    <el-select v-model="modelForm.specialMonth" multiple placeholder="请选择指定月" style="width:60%"
                               size="medium"
                    >
                      <el-option
                        v-for="(item,index) in 12"
                        :key="index"
                        :label="item"
                        :value="index">
                      </el-option>
                    </el-select>
                  </div>
                </el-form-item>
                <el-form-item label=" " prop="cinema" :rules="[]">
                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>指定日</span>
                    </div>
                    <el-select v-model="modelForm.specialDay" multiple placeholder="请选择指定日" style="width:60%"
                               size="medium"
                    >
                      <el-option
                        v-for="(item,index) in 30"
                        :key="index"
                        :label="item"
                        :value="index">
                      </el-option>
                    </el-select>
                  </div>
                </el-form-item>
              </div>
              <el-form-item label=" " prop="cinema" :rules="[]" v-if="modelForm.type=='4'">
                <div class="el-input el-input-group el-input-group--prepend addprepend" style="">
                  <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                    <span>具体日期</span>
                  </div>
                  <el-date-picker
                    type="dates"
                    v-model="modelForm.times"
                    placeholder="选择一个或多个日期" style="width:44%">
                  </el-date-picker>
                </div>

              </el-form-item>
              <el-form-item label=" " prop="cinema" :rules="[]" v-for="(item,index) in timeList" :key='index'>
                <el-row>
                  <el-col span='12'>
                    <div class="el-input el-input-group el-input-group--prepend addprepend" style="">
                      <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                        <span>时间段</span>
                      </div>
                      <el-time-picker
                        is-range
                        v-model="item.time" value-format="HH:mm" format="HH:mm"
                        range-separator="至"
                        start-placeholder="开始时间"
                        end-placeholder="结束时间"
                        placeholder="选择时间范围">
                      </el-time-picker>
                    </div>
                  </el-col>
                  <el-col span="12">
                    <el-button style="padding-right:10px;" @click="addColumn()">添加</el-button>
                    <el-button style="padding-right:10px;" @click="delColumn(index)">删除</el-button>
                  </el-col>
                </el-row>

              </el-form-item>

            </div>

            <!-- 时间条件 end -->


          </div>


          <div class="title-info1 text-left" @click="twoShow=!twoShow">
            <el-row>
              <el-col :span="10">金额条件</el-col>
              <el-col :span="14">
                <div class="text-right" style="width:100%;color:#bababa;cursor: pointer;">
                    <span>
                        <span v-if="twoShow"><i class="icon icon-shang" style="font-size:15px"></i></span>
                        <span v-if="!twoShow"><i class="icon icon-weibiaoti35" style="font-size:14px;"></i></span>
                    </span>
                </div>
              </el-col>
            </el-row>
          </div>
          <div v-if="twoShow">
            <div class="block_line">
            <el-row>
              <el-col :span="12">
                <el-form-item label=" " prop="state" :rules="[]">
                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>金额类型</span>
                    </div>
                    <el-radio-group class="radio-group" v-model="modelForm.priceType">
                      <el-radio v-for="item in priceTypes"
                                :label="item.key"
                                :value="item.key"
                                :key="item.key">
                        {{item.text}}
                      </el-radio>
                    </el-radio-group>
                    <br>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-button type="text" @click="goodShow=true" v-if="modelForm.priceType==2">请选择单品</el-button>
                <span v-if="modelForm.priceType==2">&nbsp;&nbsp;您当前选择的单品个数是：<span
                  style="font-size: 20px;color: #409EFF;margin-right: 20px;">{{selectGoodList.length}}</span> <el-button
                  type="text" @click="showSelectGoodNum">单品详情</el-button></span>


                <div v-if="modelForm.priceType==3">
                  <el-button type="text" @click="goodShow=true">请选择排除品</el-button>
                  <span>&nbsp;&nbsp;您当前选择的排除品个数是：<span
                    style="font-size: 20px;color: #409EFF;margin-right: 20px;">{{selectGoodList.length}}</span> <el-button
                    type="text" @click="showSelectGoodNum">排除品详情</el-button></span>
                </div>

              </el-col>
            </el-row>

            <el-row>
              <el-col span="14">
                <el-form-item label=" " prop="state" :rules="[]">

                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>消费金额</span>
                    </div>
                    <el-radio-group class="radio-group" v-model="modelForm.consumeType" :disabled="show">
                      <el-radio v-for="item in consumeTypes"
                                :label="item.key"
                                :value="item.key"
                                :key="item.key">
                        {{item.text}}
                      </el-radio>
                    </el-radio-group>
                    <br>
                  </div>
                </el-form-item>
              </el-col>
              <el-col span="6" class="interval">
                <el-row v-if="modelForm.consumeType==1">
                  <el-col span="11">
                    <el-form-item label=" " prop="state" :rules="[]" style="margin-left: 0px;">
                      <el-input v-model="modelForm.startInterval" placeholder="请输入最小金额" :maxlength="20" size="small"
                                style="width:100%;margin-left: 0px;"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col span="2">
                    <span style="line-height: 35px;text-align: center;padding-left:8px;padding-right:8px;">-</span>
                  </el-col>
                  <el-col span="11">
                    <el-form-item label=" " prop="state" :rules="[]" style="margin-left: 0px;">
                      <el-input v-model="modelForm.endInterval" placeholder="请输入最大金额" :maxlength="20" size="small"
                                style="width:100%;margin-left: 0px;"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-form-item label=" " prop="state" :rules="[]" style="margin-left: 0px;"
                              v-if="modelForm.consumeType==2">
                  <el-input v-model="modelForm.interval" placeholder="请输入最小金额" :maxlength="20" size="small"
                            style="width:60%;margin-left: 0px;"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            </div>
          </div>
          <div class="title-info1 text-left" @click="threeShow=!threeShow">
            <el-row>
              <el-col :span="10">数量条件</el-col>
              <el-col :span="14">
                <div class="text-right" style="width:100%;color:#bababa;cursor: pointer;">
                    <span>
                        <span v-if="threeShow"><i class="icon icon-shang" style="font-size:15px"></i></span>
                        <span v-if="!threeShow"><i class="icon icon-weibiaoti35" style="font-size:14px;"></i></span>
                    </span>
                </div>
              </el-col>
            </el-row>
          </div>
          <div v-if="threeShow">
            <div class="block_line">
            <el-row>
              <el-col :span="12">
                <el-form-item label=" " prop="state" :rules="[]">
                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>数量类型</span>
                    </div>
                    <el-radio-group class="radio-group" v-model="modelForm.numType">
                      <el-radio v-for="item in priceTypes"
                                :label="item.key"
                                :value="item.key"
                                :key="item.key">
                        {{item.text}}
                      </el-radio>
                    </el-radio-group>
                    <br>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-button type="text" @click="goodShow=true" v-if="modelForm.numType==2">请选择单品</el-button>
                <span v-if="modelForm.numType==2">&nbsp;&nbsp;您当前选择的单品个数是：<span
                  style="font-size: 20px;color: #409EFF;margin-right: 20px;">{{selectGoodList.length}}</span> <el-button
                  type="text" @click="showSelectGoodNum">单品详情</el-button></span>

                <div v-if="modelForm.numType==3">
                  <el-button type="text" @click="goodShow=true">请选择排除品</el-button>
                  <span>&nbsp;&nbsp;您当前选择的排除品个数是：<span
                    style="font-size: 20px;color: #409EFF;margin-right: 20px;">{{selectGoodList.length}}</span> <el-button
                    type="text" @click="showSelectGoodNum">排除品详情</el-button></span>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col span="14">
                <el-form-item label=" " prop="state" :rules="[]">

                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>消费数量</span>
                    </div>
                    <el-radio-group class="radio-group" v-model="modelForm.numCount" :disabled="show">
                      <el-radio v-for="item in numTypes"
                                :label="item.key"
                                :value="item.key"
                                :key="item.key">
                        {{item.text}}
                      </el-radio>
                    </el-radio-group>
                    <br>
                  </div>
                </el-form-item>
              </el-col>
              <el-col span="6" class="interval">
                <el-row v-if="modelForm.numCount==1">
                  <el-col span="11">
                    <el-form-item label=" " prop="state" :rules="[]" style="margin-left: 0px;">
                      <el-input v-model="modelForm.startInterval" placeholder="请输入最小数量" :maxlength="20" size="small"
                                style="width:100%;margin-left: 0px;"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col span="2">
                    <span style="line-height: 35px;text-align: center;padding-left:8px;padding-right: 8px;">-</span>
                  </el-col>
                  <el-col span="11">
                    <el-form-item label=" " prop="state" :rules="[]" style="margin-left: 0px;">
                      <el-input v-model="modelForm.endInterval" placeholder="请输入最大数量" :maxlength="20" size="small"
                                style="width:100%;margin-left: 0px;"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-form-item label=" " prop="state" :rules="[]" style="margin-left: 0px;" v-if="modelForm.numCount==2">
                  <el-input v-model="modelForm.num" placeholder="请输入最小数量" :maxlength="20" size="small"
                            style="width:60%;margin-left: 0px;"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            </div>
          </div>
          <div class="title-info1 text-left" @click="fourShow=!fourShow">
            <el-row>
              <el-col :span="10">会员条件</el-col>
              <el-col :span="14">
                <div class="text-right" style="width:100%;color:#bababa;cursor: pointer;">
                    <span>
                        <span v-if="fourShow"><i class="icon icon-shang" style="font-size:15px"></i></span>
                        <span v-if="!fourShow"><i class="icon icon-weibiaoti35" style="font-size:14px;"></i></span>
                    </span>
                </div>
              </el-col>
            </el-row>
          </div>
          <div v-if="fourShow">
            <div class="block_line">
            <el-row :gutter="10">
              <el-col span="16">
                <el-form-item label=" " prop="state" :rules="[]">

                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>会员类型</span>
                    </div>
                    <el-radio-group class="radio-group" v-model="modelForm.choseType" :disabled="show"
                                    @change="clearMemeber">
                      <el-radio v-for="item in memberTypes"
                                :label="item.key"
                                :value="item.key"
                                :key="item.key">
                        {{item.text}}
                      </el-radio>
                    </el-radio-group>
                    <br>
                  </div>
                </el-form-item>
              </el-col>
              <el-col span="6">
                <el-button type="text" @click="memeberShow=true" v-if="modelForm.choseType==2">请选择会员</el-button>
              </el-col>
            </el-row>

            <el-form-item label=" " prop="cinema" :rules="[]" v-if="modelForm.choseType==1">
              <div class="el-input el-input-group el-input-group--prepend addprepend">
                <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                  <span>会员类别</span>
                </div>
                <el-select v-model="modelForm.memberType" multiple placeholder="请选择类别" style="width:60%" size="medium"
                >
                  <el-option
                    v-for="item in memberTypeList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id">
                  </el-option>
                </el-select>
              </div>

            </el-form-item>
            <div style="margin-left: 100px;margin-bottom:20px;" v-if="modelForm.choseType==2">
            <span>您当前选择的会员个数是：<span style="font-size: 20px;color: #409EFF;margin-right: 20px;">{{selectMemberList.length}}</span> <el-button
              type="text" @click="showSelectNum">会员详情</el-button></span>
              <!--<el-tag  style="margin-left: 10px;"-->
              <!--v-for="tag in selectMemberList"-->
              <!--:key="tag.name"-->
              <!--closable-->
              <!--@close="handleClose(tag)"-->
              <!--&gt;-->
              <!--{{tag.name}}-->
              <!--</el-tag>-->
            </div>
            </div>
          </div>
          <div class="title-info1 text-left" @click="fiveShow=!fiveShow">
            <el-row>
              <el-col :span="10">卖品条件</el-col>
              <el-col :span="14">
                <div class="text-right" style="width:100%;color:#bababa;cursor: pointer;">
                    <span>
                        <span v-if="fiveShow"><i class="icon icon-shang" style="font-size:15px"></i></span>
                        <span v-if="!fiveShow"><i class="icon icon-weibiaoti35" style="font-size:14px;"></i></span>
                    </span>
                </div>
              </el-col>
            </el-row>
          </div>
          <div v-if="fiveShow">
            <div class="block_line">
            <el-row :gutter="10">
              <el-col span="16">
                <el-form-item label=" " prop="state" :rules="[]">

                  <div class="el-input el-input-group el-input-group--prepend addprepend">
                    <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                      <span>卖品类型</span>
                    </div>
                    <el-radio-group class="radio-group" v-model="modelForm.sellingSelect" :disabled="show"
                                    @change="clearGood">
                      <el-radio v-for="item in sellingSelects"
                                :label="item.key"
                                :value="item.key"
                                :key="item.key">
                        {{item.text}}
                      </el-radio>
                    </el-radio-group>
                    <br>
                  </div>
                </el-form-item>
              </el-col>
              <el-col span="6">
                <el-button type="text" @click="goodShow=true" v-if="modelForm.sellingSelect==2">请选择卖品</el-button>
              </el-col>
            </el-row>

            <el-form-item label=" " prop="cinema" :rules="[]" v-if="modelForm.sellingSelect==1">
              <div class="el-input el-input-group el-input-group--prepend addprepend">
                <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                  <span>卖品类别</span>
                </div>
                <el-select v-model="modelForm.goodType" multiple placeholder="请选择类别" style="width:60%" size="medium"
                >
                  <el-option
                    v-for="item in goodTypeList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id">
                  </el-option>
                </el-select>
              </div>

            </el-form-item>
            <div style="margin-left: 100px;;margin-bottom:20px;" v-if="modelForm.sellingSelect==2">
            <span>您当前选择的卖品个数是：<span
              style="font-size: 20px;color: #409EFF;margin-right: 20px;">{{selectGoodList.length}}</span> <el-button
              type="text" @click="showSelectGoodNum">卖品详情</el-button></span>
            </div>
            </div>
          </div>
          <!--<div class="title-info1 text-left" @click="sixShow=!sixShow">
            <el-row>
              <el-col :span="10">其它条件</el-col>
              <el-col :span="14">
                <div class="text-right" style="width:100%;color:#bababa;cursor: pointer;">
                    <span>
                        <span v-if="sixShow"><i class="icon icon-shang" style="font-size:15px"></i></span>
                        <span v-if="!sixShow"><i class="icon icon-weibiaoti35" style="font-size:14px;"></i></span>
                    </span>
                </div>
              </el-col>
            </el-row>
          </div>
          <div v-if="sixShow">
            <div class="block_line">
            <el-form-item label=" " prop="cinema" :rules="[]">
              <div class="el-input el-input-group el-input-group&#45;&#45;prepend addprepend">
                <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                  <span>影片</span>
                </div>
                <el-select v-model="modelForm.films" multiple placeholder="请选择影片" style="width:60%" size="medium"
                >
                  <el-option
                    v-for="item in filmList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id">
                  </el-option>
                </el-select>
              </div>

            </el-form-item>

            <el-form-item label=" " prop="cinema" :rules="[]">
              <div class="el-input el-input-group el-input-group&#45;&#45;prepend addprepend">
                <div class="el-input-group__prepend addPrependText-medium" tabIndex="-1">
                  <span>影厅</span>
                </div>
                <el-select v-model="modelForm.hall" multiple placeholder="请选择影厅" style="width:60%" size="medium"
                >
                  <el-option
                    v-for="item in hallList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id">
                  </el-option>
                </el-select>
              </div>

            </el-form-item>
            </div>
          </div>-->
        </div>

        <el-form-item class="text-left">
          <!--submitForm('modelForm')-->
          <el-button size="medium" type="primary">提交</el-button>
          <el-button size="medium" type="success" @click="goBack()">返回</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!--<select-memeber :isShow="memeberShow" @close="memeberShow=false" @getData="getMember"></select-memeber>-->
    <!--<select-good :isShow="goodShow" @close="goodShow=false" @getData="getGood"></select-good>-->
    <!--<member-show :isShow="memberNum" :memberList="selectMemberList" @close="memberNum=false"></member-show>-->
    <!--<good-show :isShow="goodNum" :goodList="selectGoodList" @close="goodNum=false"></good-show>-->
  </div>
</template>
<script>
  //注意路径
//  import selectMemeber from "@/components/selectMember.vue"
//  import memberShow from "@/components/memberShow.vue"
//  import goodShow from "@/components/goodShow.vue"
//  import selectGood from "@/components/selectGood.vue"

  export default {
    data() {
      return {
        oneShow: true,
        twoShow: true,
        threeShow: true,
        fourShow: true,
        fiveShow: true,
        sixShow: true,
        sevenShow: true,
        eightShow: true,
        goodNum: false,
        memberNum: false,
        showInfo: true,
        goodShow: false,
        memeberShow: false,
        selectMemberList: [],
        selectGoodList: [],
        weekList: [{text: "周一", key: 1}, {text: "周二", key: 2}, {text: "周三", key: 3}, {text: "周四", key: 4}, {
          text: "周五",
          key: 5
        }, {text: "周六", key: 6}, {text: "周日", key: 7}],
        tags: [
          {name: "星期表示选择周几+时间段(N)", type: ""},
          {name: "日期段表示具体日期+时间段(N)", type: "success"},
          {name: "每月指定日期表示每月几号+时间段(N)", type: "info"},
          {name: "每月具体日期表示某一天+时间段(N)", type: "warning"}
        ],
        type: [
          {name: "星期", id: 1},
          {name: "日期段", id: 2},
          {name: "指定日期", id: 3},
          {name: "具体日期", id: 4}
        ],
        modelForm: {
          week: [],
          type: 1,
          discountType: 1,
          consumeType: 1,
          numType: 1,
          choseType: 1,
          platformType: 1,
          sellingSelect: 1,
          films: [],
          hall: [],
          state: 1,
          priceType: 1,
          specialMonth: []

        },
        timeList: [{time: ""}],
        priceTypes: [
          {text: "整单", key: 1},
          {text: "单品", key: 2},
          {text: "排除品", key: 3},
        ],
        consumeTypes: [
          {text: "区间", key: 1},
          {text: "最低消费", key: 2},
        ],
        numTypes: [
          {text: "区间", key: 1},
          {text: "最低数量", key: 2},
        ],
        memberTypes: [
          {text: "会员级别", key: 1},
          {text: "指定会员", key: 2},
        ],
        memberTypeList: [
          {name: "金卡", id: 1}, {name: "银卡", id: 2},
          {name: "钻石卡", id: 3},
          {name: "普通卡", id: 4},

        ],
        platformTypes: [
          {text: "平台会员", key: 1},
          {text: "影院会员", key: 2},
        ],
        sellingSelects: [
          {text: "卖品类别", key: 1},
          {text: "指定卖品", key: 2},
        ],
        goodTypeList: [
          {name: "饮料类", id: 1}, {name: "小吃类", id: 2},
        ],
        filmList: [
          {name: "长江七号", id: 1},
          {name: "速度与激情", id: 2},
          {name: "超时空同居", id: 3},
          {name: "奇迹男孩", id: 4},
          {name: "泰坦尼克号", id: 5},
        ],
        hallList: [
          {name: "豪华大厅", id: 1},
          {name: "奢华小厅", id: 2},
          {name: "卡通厅", id: 3},
        ],
        discountTypes: [
          {name: "折扣", id: 1},
          {name: "满减", id: 2},
          {name: "满送", id: 3},
          {name: "积分", id: 4},
          {name: "特价", id: 5},
          {name: "优惠券", id: 6},
        ],
        states: [
          {text: "正常", key: 1},
          {text: "禁用", key: 2},
        ]
      };
    },
    components: {
//      selectMemeber,
//      selectGood,
//      memberShow,
//      goodShow
    },
    created() {
      window.this = this;
    },
    methods: {
      goBack() {
        this.router.go(-1);
      },
      getDiscount(id) {
        console.log(id);
        // this.modelForm.discountType=id;
        this.$set(this.modelForm, "discountType", id);
        console.log(this.modelForm.discountType);
      },
      showSelectGoodNum() {
        if (this.selectGoodList.length > 0) {
          this.goodNum = true;
        }
      },
      showSelectNum() {
        if (this.selectMemberList.length > 0) {
          this.memberNum = true;
        }
      },
      getGood(data) {
        this.selectGoodList = data;
        this.goodShow = false;
      },
      clearMemeber() {
        this.selectMemberList = [];
      },
      clearGood() {
        this.selectGoodList = [];
      },
      handleClose(tag) {
        console.log(this.selectMemberList);
        if (this.selectMemberList && this.selectMemberList.length >= 1) {
          this.selectMemberList.splice(this.selectMemberList.indexOf(tag), 1);
        }

      },
      handleGoodClose(tag) {
        if (this.selectGoodList && this.selectGoodList.length >= 1) {
          this.selectGoodList.splice(this.selectGoodList.indexOf(tag), 1);
        }
      },
      getMember(data) {
        this.selectMemberList = data;
        this.memeberShow = false;
      },
      addColumn() {
        this.timeList.push({time: ""});
      },
      delColumn(index) {
        if (this.timeList.length > 1) {
          this.timeList.splice(index, 1);
        } else {
          this.$message.info("最少保留一条");
        }
      }
    }
  };
</script>
<style scoped>
  .title-info {
    background-color: #f8f8f8;
    border: 1px solid #e4e4e4;
    /* color: #23c6c8; */
    font-weight: bold;
    padding: 10px;
    margin-bottom: 20px;
    width: 100%;
    color: #000000 !important;
  }

  .title-info1 {
    color: #000000 !important;
    font-weight: bold;
    padding: 10px 20px;
    /*margin-bottom: 20px;*/
    width: 95%;
    border: 1px solid #ccc;
    margin: 20px 20px 0px 20px;
  }

  .table-title {
    color: #000000 !important;
  }
  .block_line{
    color: #000000 !important;
    font-weight: bold;
    padding: 20px 20px 10px 20px;
    width: 95%;
    margin: 0px 20px 20px 20px;
    border-bottom: 1px solid #ccc;
    border-left:1px solid #ccc;
    border-right:1px solid #ccc;

  }
</style>
